.class Les/oe0;
.super Ljava/io/InputStream;
.source "OBEXOperationInputStream.java"


# instance fields
.field private final a:Les/me0;

.field private b:[B

.field private c:I

.field private d:I

.field private e:Ljava/lang/Object;

.field public f:Z

.field private g:Z


# direct methods
.method constructor <init>(Les/me0;)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/io/InputStream;-><init>()V

    const/16 v0, 0x4000

    new-array v0, v0, [B

    .line 2
    iput-object v0, p0, Les/oe0;->b:[B

    const/4 v0, 0x0

    .line 3
    iput v0, p0, Les/oe0;->c:I

    .line 4
    iput v0, p0, Les/oe0;->d:I

    .line 5
    new-instance v1, Ljava/lang/Object;

    invoke-direct {v1}, Ljava/lang/Object;-><init>()V

    iput-object v1, p0, Les/oe0;->e:Ljava/lang/Object;

    .line 6
    iput-boolean v0, p0, Les/oe0;->f:Z

    .line 7
    iput-boolean v0, p0, Les/oe0;->g:Z

    .line 8
    iput-object p1, p0, Les/oe0;->a:Les/me0;

    return-void
.end method


# virtual methods
.method a([BZ)V
    .locals 6

    .line 1
    iget-boolean v0, p0, Les/oe0;->f:Z

    if-nez v0, :cond_5

    iget-boolean v0, p0, Les/oe0;->g:Z

    if-eqz v0, :cond_0

    goto :goto_2

    .line 2
    :cond_0
    iget-object v0, p0, Les/oe0;->e:Ljava/lang/Object;

    monitor-enter v0

    if-eqz p2, :cond_1

    const/4 p2, 0x1

    .line 3
    :try_start_0
    iput-boolean p2, p0, Les/oe0;->g:Z

    goto :goto_0

    :catchall_0
    move-exception p1

    goto :goto_1

    :cond_1
    :goto_0
    if-eqz p1, :cond_4

    .line 4
    array-length p2, p1

    if-eqz p2, :cond_4

    .line 5
    iget p2, p0, Les/oe0;->d:I

    array-length v1, p1

    add-int/2addr p2, v1

    iget-object v1, p0, Les/oe0;->b:[B

    array-length v1, v1

    const/4 v2, 0x0

    if-le p2, v1, :cond_3

    .line 6
    array-length p2, p1

    iget v1, p0, Les/oe0;->d:I

    iget v3, p0, Les/oe0;->c:I

    sub-int/2addr v1, v3

    add-int/2addr p2, v1

    mul-int/lit8 p2, p2, 0x2

    .line 7
    iget-object v1, p0, Les/oe0;->b:[B

    array-length v1, v1

    if-ge p2, v1, :cond_2

    .line 8
    iget-object p2, p0, Les/oe0;->b:[B

    array-length p2, p2

    .line 9
    :cond_2
    new-array p2, p2, [B

    .line 10
    iget-object v1, p0, Les/oe0;->b:[B

    iget v3, p0, Les/oe0;->c:I

    iget v4, p0, Les/oe0;->d:I

    iget v5, p0, Les/oe0;->c:I

    sub-int/2addr v4, v5

    invoke-static {v1, v3, p2, v2, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 11
    iput-object p2, p0, Les/oe0;->b:[B

    .line 12
    iget p2, p0, Les/oe0;->d:I

    iget v1, p0, Les/oe0;->c:I

    sub-int/2addr p2, v1

    iput p2, p0, Les/oe0;->d:I

    .line 13
    iput v2, p0, Les/oe0;->c:I

    .line 14
    :cond_3
    iget-object p2, p0, Les/oe0;->b:[B

    iget v1, p0, Les/oe0;->d:I

    array-length v3, p1

    invoke-static {p1, v2, p2, v1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 15
    iget p2, p0, Les/oe0;->d:I

    array-length p1, p1

    add-int/2addr p2, p1

    iput p2, p0, Les/oe0;->d:I

    .line 16
    :cond_4
    iget-object p1, p0, Les/oe0;->e:Ljava/lang/Object;

    invoke-virtual {p1}, Ljava/lang/Object;->notifyAll()V

    .line 17
    monitor-exit v0

    return-void

    :goto_1
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1

    :cond_5
    :goto_2
    return-void
.end method

.method public available()I
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/oe0;->e:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget v1, p0, Les/oe0;->d:I

    iget v2, p0, Les/oe0;->c:I

    sub-int/2addr v1, v2

    monitor-exit v0

    return v1

    :catchall_0
    move-exception v1

    .line 3
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public close()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Les/oe0;->f:Z

    .line 2
    iget-object v0, p0, Les/oe0;->e:Ljava/lang/Object;

    monitor-enter v0

    .line 3
    :try_start_0
    iget-object v1, p0, Les/oe0;->e:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 4
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public read()I
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-boolean v0, p0, Les/oe0;->f:Z

    if-nez v0, :cond_3

    .line 2
    iget-object v0, p0, Les/oe0;->a:Les/me0;

    invoke-interface {v0}, Les/me0;->isClosed()Z

    move-result v0

    const/4 v1, -0x1

    if-eqz v0, :cond_0

    iget v0, p0, Les/oe0;->d:I

    iget v2, p0, Les/oe0;->c:I

    if-ne v0, v2, :cond_0

    return v1

    .line 3
    :cond_0
    iget-object v0, p0, Les/oe0;->e:Ljava/lang/Object;

    monitor-enter v0

    .line 4
    :goto_0
    :try_start_0
    iget-boolean v2, p0, Les/oe0;->g:Z

    if-nez v2, :cond_1

    iget-object v2, p0, Les/oe0;->a:Les/me0;

    instance-of v2, v2, Les/qe0;

    if-eqz v2, :cond_1

    iget-boolean v2, p0, Les/oe0;->f:Z

    if-nez v2, :cond_1

    iget-object v2, p0, Les/oe0;->a:Les/me0;

    .line 5
    invoke-interface {v2}, Les/me0;->isClosed()Z

    move-result v2

    if-nez v2, :cond_1

    iget v2, p0, Les/oe0;->d:I

    iget v3, p0, Les/oe0;->c:I

    if-ne v2, v3, :cond_1

    .line 6
    iget-object v2, p0, Les/oe0;->a:Les/me0;

    check-cast v2, Les/qe0;

    invoke-interface {v2, p0}, Les/qe0;->a(Les/oe0;)V

    goto :goto_0

    .line 7
    :cond_1
    iget v2, p0, Les/oe0;->d:I

    iget v3, p0, Les/oe0;->c:I

    if-ne v2, v3, :cond_2

    .line 8
    monitor-exit v0

    return v1

    .line 9
    :cond_2
    iget-object v1, p0, Les/oe0;->b:[B

    iget v2, p0, Les/oe0;->c:I

    add-int/lit8 v3, v2, 0x1

    iput v3, p0, Les/oe0;->c:I

    aget-byte v1, v1, v2

    and-int/lit16 v1, v1, 0xff

    monitor-exit v0

    return v1

    :catchall_0
    move-exception v1

    .line 10
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1

    .line 11
    :cond_3
    new-instance v0, Ljava/io/IOException;

    const-string v1, "Stream closed"

    invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    goto :goto_2

    :goto_1
    throw v0

    :goto_2
    goto :goto_1
.end method
